import App from './App'
import store from './store'
import api from './common/api'
import uView from '@/uni_modules/uview-ui'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
Vue.use(uView)
Vue.prototype.$api = api
Vue.prototype.$store=store

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// 不用vue3了，用vue3使用uview-ui会报错
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  
  app.config.globalProperties.$api = api
  app.use(uView)
  return {
    app
  }
}
// #endif